<bookcatalog>
{
for $book at $index in doc("catalog.xml")/bookcatalog/section/book
let $price := $book/price
let $genre := $book/genre
where $genre = "Fantasy"
order by $price descending
return
<book index = "{$index}">
{$book/@*}
{$book/*}
</book>
}
</bookcatalog>
